package com.ruoyi.xuexiao.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.xuexiao.domain.entity.JgSysDept;
import com.ruoyi.xuexiao.domain.vo.SysDeptReturnVo;
import com.ruoyi.xuexiao.mapper.JgSysDeptMapper;
import com.ruoyi.xuexiao.service.JgSysDeptService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 部门表(处室表)Mapper实现层
 *
 * @author 郭梓强
 * @since 2024-05-23 22:01:19
 */

@Service
@AllArgsConstructor
public class JgSysDeptImpl extends ServiceImpl<JgSysDeptMapper, JgSysDept> implements JgSysDeptService {

    private final JgSysDeptMapper jgSysDeptMapper;


    /**
     * 获取部门表(处室表)
     *
     * @author 郭梓强
     * @since 2024年5月30日22:11:46
     */
    @Override
    public List<SysDeptReturnVo> selSysDeptReturnVo() {
        List<JgSysDept> jgSysDepts = jgSysDeptMapper.selectList(null);
        return BeanUtil.copyToList(jgSysDepts, SysDeptReturnVo.class);
    }
}
